<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>

    <script src="https://cdn.jsdelivr.net/npm/vue@2/dist/vue.js"></script>

</head>

<body>



    <!-- <div id="root" :style="styleobj" v-show="true">{{name}}</div> -->
    <!-- <div id="root" :style="styleobj" v-show="1 === 1">{{name}}</div> -->
    <div id="root">

        <!-- <h1 v-if="false">hhhhh</h1> -->
        <!-- <h1 v-if="1===2">hhhhh</h1> -->
        <div v-show="n===1" >

            <h1>beijing</h1>
            <h1>shanghai</h1>
            <h1>guangzhou</h1>
            <!-- <h1 v-show="n===1">beijing</h1>
            <h1 v-show="n==1">shanghai</h1>
            <h1 v-show="n==1">guangzhou</h1> -->
        </div>

        <template v-if="n===1" >

            <h1>beijing</h1>
            <h1>shanghai</h1>
            <h1>guangzhou</h1>
            <!-- <h1 v-show="n===1">beijing</h1>
            <h1 v-show="n==1">shanghai</h1>
            <h1 v-show="n==1">guangzhou</h1> -->
        </template>
    </div>


</body>

<script>
    new Vue({
        el: "#root",
        data: {
            name: '尚硅谷',
            styleobj: {
                fontSize: "40px",
            },
            n: 1
        }
    })
</script>

</html>